/**
 * @Project Name:sentinel-dubbo-service
 * @Package Name:cn.hoofungson.studio.sentinel.dubbo.service.provider.service.business.user
 * @Since JDK 1.8
 */
package cn.hoofungson.studio.sentinel.dubbo.service.provider.service.business.user;

import cn.hoofungson.studio.sentinel.dubbo.service.interfaces.service.business.user.UserBusinessService;
import cn.hoofungson.studio.sentinel.dubbo.service.provider.util.exception.ExceptionUtil;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

/**
 * @Description: 用户业务服务实现
 * @Author 胡松 hoofungson@163.com
 * @Date 2019-05-29 22:31
 * @Version V1.0
 */
@Service
@Component
public class UserBusinessServiceImpl implements UserBusinessService {
    /**
     * 保存或更新
     *
     * @param username
     * @return
     **/
    @SentinelResource(value = "UserBusinessService.sayHello", blockHandlerClass = {ExceptionUtil.class}, blockHandler = "exceptionHandler")
    @Override
    public String sayHello(String username) {
        return username.concat("说: 世界，你好！");
    }
}
